# -*- ecoding: utf-8 -*-
# @ModuleName: trade_api
# @Author: wangwei 
# @Time: 2023/10/18 21:02
from api.buyer.buyerbaseapi import BuyerBaseApi


class BuyNowApi(BuyerBaseApi):

    def __init__(self, sku_id=43564, num=1):
        super().__init__()
        self.url = f"{self.host}/trade/carts/buy"
        self.method = "post"
        self.data = {
            "sku_id": sku_id,
            "num": num
        }


class AddCart(BuyerBaseApi):

    def __init__(self, sku_id=43564, num=1):
        super().__init__()
        self.url = f"{self.host}/trade/carts"
        self.method = "post"
        self.data = {
            "sku_id": sku_id,
            "num": num
        }


class ClearCart(BuyerBaseApi):

    def __init__(self):
        super().__init__()
        self.url = f"{self.host}/trade/carts"
        self.method = "delete"


class SumbitOrder(BuyerBaseApi):

    def __init__(self):
        super().__init__()
        self.url = f"{self.host}/trade/create"
        self.method = "post"
        self.data={}

